class Solution():
    def twoSum(self,nums,target):
        candidate_dict = dict()
        size = len(nums)
        for i in range(size):
            if (target - nums[i]) in candidate_dict:
                return [i,candidate_dict[target - nums[i]]]
            else:
                candidate_dict[nums[i]] = i

